use crate::handlers::role_handler as RoleHandler;
use actix_web::{web, Scope};

pub struct RoleRoutes;

impl RoleRoutes {
    pub fn init() -> Scope {
        web::scope("/role")
            .route("/create", web::post().to(RoleHandler::create))
            .route("/delete", web::post().to(RoleHandler::delete))
            .route("/update", web::post().to(RoleHandler::update))
            .route("/detail", web::get().to(RoleHandler::detail))
            .route("/list", web::get().to(RoleHandler::list))
            .route("/bind", web::post().to(RoleHandler::bind))
    }
}
